package com.cherry.mvc.controller;

import com.cherry.mvc.exception.SystemException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ExceptionController {

    @RequestMapping(path = "/exception")
    public String exception() throws SystemException {
        try {
            int a = 1 / 0;
        } catch (Exception e) {
            throw new SystemException("自定义异常抛出");
        }
        return "hello";
    }

}
